select @passDecision:=EventTypeId from EventType where Name='PassDecision';
select @docCardFinalization:=EventTypeId from EventType where Name='DocCardFinalization';
select @docCardRegistration:=EventTypeId from EventType where Name='DocCardRegistration';
select @postponeDecision:=EventTypeId from EventType where Name='PostponeDecision';
select @considerationStarted:=EventTypeId from EventType where Name='ConsiderationStarted';
select @passedToNextRoutePoint:=EventTypeId from EventType where Name='PassedToNextRoutePoint';


-- events of DocCard1
insert into event (DocCard, EventType, DcUser, Deputy, RoutePointNum, EventTime, 
	Note, Text)
	Values (@docCard1, @docCardRegistration, @docCircUser1, null, 0, '2007-06-06 10:00', 
	'This is a new document card 1', 'Text1');
set @docCard1Event1 = last_insert_id();

insert into event (DocCard, EventType, DcUser, Deputy, RoutePointNum, EventTime, 
	Note, Text)
	Values (@docCard1, @considerationStarted, @docCircUser1, null, 0, '2007-06-06 10:00', 
	'Consideration is started', 'Text2');

set @docCard1Event2 = last_insert_id();

insert into event (DocCard, EventType, DcUser, Deputy, RoutePointNum, EventTime,
	Note, Text)
	Values (@docCard1, @passedToNextRoutePoint, @docCircUser1, null, 1, '2007-06-07 10:00',
	'The first route point consideration has begun', 'Text3');
	
set @docCard1Event3 = last_insert_id();

-- events of DocCard2
insert into event (DocCard, EventType, DcUser, Deputy, RoutePointNum, EventTime, 
	Note, Text)
	Values (@docCard2, @docCardRegistration, @docCircUser2, @docCircUser1, 0, '2007-06-10 11:00', 
	'This is a new document card 2', 'Text4');
set @docCard2Event1 = last_insert_id();
